//
// Created by tang on 23-3-25.
//

#ifndef PIINFO_RENDER_SERVICE_HPP
#define PIINFO_RENDER_SERVICE_HPP

#include <string>
#include "service/svc_manager.hpp"

using image_handle = void *;

class ui_view;
class IRenderService: public TaggedService<service_type::render>
{
public:
    virtual image_handle create_image_from_content(const u8* dat, u32 size) = 0;

    virtual image_handle create_image_from_file(const std::string &path) = 0;

    virtual void free_image(image_handle img) = 0;

    virtual ui_view* create_view_from_data(const u8* dat, u32 size) = 0;

    virtual ui_view* create_view_from_file(const std::string &path) = 0;
};

#endif  // PIINFO_RENDER_SERVICE_HPP
